{% extends 'admin/base_site.html' %}
{% load suit_tags admin_static %}

{# Following is an example how to extend admin by custom CSS or JS files #}
{# Add extra CSS for admin #}
{#{% block extrastyle %}#}
{#    {{ block.super }}#}
{#    <link rel="stylesheet" href="{% static 'css/demo.css' %}">#}
{#{% endblock %}#}

{#{% block foot %}#}
{#    {{ block.super }}#}
{#    <script type="text/javascript"></script>#}
{#{% endblock %}#}

{% block footer %}
{#    </div> <!-- Put footer outside #container -->#}
    {% if not is_popup %}
        <div id="footer">
        <footer class="footer">
            <div class="container-fluid">
                {% block footer_content %}
                    <div class="row">

                        <div class="col-xs-12 col-sm-3 footer-links">
                            {% block footer_links %}
                                <a href="http://console.wimift.com/h5/credit/login.html" target="_blank">Credit Console</a>
{#                                <a href="http://www.baidu.com" target="_blank">Licence</a>#}
{#                                <a href="http://www.baidu.com" target="_blank">Report a bug</a>#}
                            {% endblock %}
                        </div>

                        <div class="col-xs-12 col-sm-6 text-sm-center footer-copyright">
                            {% block copyright %}
                                Copyright &copy;
                                <span class="hidden-md-down">2017-</span>{% now "Y" %} Wimift
                                <br>Developed by
                                <a href="https://www.wimift.com" target="_blank">wimift.com</a>
                            {% endblock %}
                        </div>

                        <div class="col-xs-12 col-sm-3 text-sm-right footer-version">
                            {% block footer_branding %}
                                {% with admin_name=site_header|default:_('Django administration') django_version='django_version'|suit_conf:request %}
                                    {{ admin_name }}
                                    {% if admin_name == 'Django Suit' %}
                                        <span style="font-size: 12px">
                                            {{ 'version'|suit_conf:request }}<br/>
                                            Django {{ django_version }}
                                        </span>
                                    {% endif %}
                                {% endwith %}
                            {% endblock %}
                        </div>

                    </div>
                {% endblock %}
            </div>
        </footer>
    {% endif %}

{#    {{ block.super }}#}
    <script src="{% static "suit/js/suit.js" %}"></script>
    {% if cl.formset or action_form and 'toggle_changelist_top_actions'|suit_conf:request %}
        <script type="text/javascript">
            Suit.ListActionsToggle.init();
        </script>
    {% elif adminform %}
        <script type="text/javascript">

            Suit.$("#{{ opts.model_name }}_form").suitFormDebounce();

            {% if 'form_submit_on_right'|suit_conf:request %}
                Suit.FixedBar.init();
            {% endif %}

            {% if adminform.model_admin.suit_form_tabs %}
                Suit.$(function () {
                    Suit.$('#suit_form_tabs').suitFormTabs();
                });
            {% endif %}

{#            {% if 'layout'|suit_conf:request.current_app == 'vertical' %}#}
{#                Suit.$('#content').prepend(Suit.$('.breadcrumbs'));#}
{#            {% endif %}#}
        </script>
    {% endif %}

{#    <div> <!-- Fix/close div previously closed by footer -->#}
{% endblock %}


{# Switch for demonstration purposes, not indended for production use #}
{#{% block usertools %}#}
{#    {% with suit_layout='layout'|suit_conf:request %}#}
{#        {% if suit_layout == 'horizontal' %}#}
{#            <a href="{% url 'admin:index' %}?__suit_layout=vertical" class="demo-layout-switch">#}
{#                Switch to vertical#}
{#            </a>#}
{#        {% else %}#}
{#            <a href="{% url 'admin:index' %}?__suit_layout=horizontal" class="demo-layout-switch">#}
{#                Switch to horizontal#}
{#            </a>#}
{#        {% endif %}#}
{##}
{#        {{ block.super }}#}
{##}
{#    {% endwith %}#}
{##}
{#    <style type="text/css">#}
{#        body #header a.demo-layout-switch {#}
{#            color: #687086;#}
{#        }#}
{##}
{#        body.suit_layout_vertical .demo-layout-switch {#}
{#            background-color: #383D4B;#}
{#            order: 10;#}
{#            text-align: center;#}
{#            padding: .5rem 0;#}
{#        }#}
{#    </style>#}
{#{% endblock %}#}
